﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LocSelectionList.aspx.cs" Inherits="WMS6.Web.Configuration.LocSelectionList" meta:resourcekey="Page" %>
<%@ PreviousPageType VirtualPath="~/Configuration/LocSelectionQuery.aspx" %>
<%@ Register src="../UserControls/Pager.ascx" tagname="Pager" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1"  runat="server">
    <title>LocSelectionList</title>
   <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>
    <script src="../Js/util.js" id="js" type="text/javascript"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>    
    <script src="../Js/checkbox.js" type="text/javascript"></script>
      <base target="_self" /> 
    <script type="text/javascript">
       //初始化页面
        window.onload = function(){
            
            var action = document.getElementById("hdnActionID").value;
            if(action != null && action != "")
            {
                var array = action.split(',');
                initQueryPage(array[0],array[1]);
            }
            else
            {
                initListPage();
            }
        }
        
        function returnSearch()
        {
            var from = document.getElementById("hdnFrom").value;
            if(from != "")
            {
                window.location.href = "LocSelectionQuery.aspx";
            }
            else
            {
                window.history.go(-1);
            }
         }
         
         function confirmMsg(code)
        {
            if(code == "C001")
            {
                if(confirm('<%=GetGlobalMsgResource("C001") %>'))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }

        }
         
    </script>
</head>
<body>
    <form id="F2176" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_List_top">
            <table>
                <tr>
                   <td valign="bottom"><asp:Label ID="lblUom" runat="server" CssClass="label_header"  Text="货位筛选条件列表" meta:resourcekey="lblUom"></asp:Label></td>
                    <td><asp:Button ID="btnNew" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnNew%>"  
                            Enabled="False" OnClick="btnNew_Click"  /></td>
                    <td><asp:Button ID="btnEdit" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnEdit%>" 
                            Enabled="False" OnClick="btnEdit_Click"
                              /></td>
                    <td><asp:Button ID="btnDelete" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnDelete%>" 
                            Enabled="False" OnClientClick="javascript:if(confirmMsg('C001')) return true; else return false;" 
                              OnClick="btnDelete_Click" /></td>
                    <td><asp:Button ID="btnAction" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnAction%>" Enabled="False" 
                             /></td>
                </tr>
            </table>
        </div>
        
        <div class="blank8">
        </div>
        
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                
                <div id="div_List">
                    <div id="div_List_msg">
                        <asp:Label ID="lblMsg" runat="server" CssClass="label_message"></asp:Label>
                    </div>
                    
                    <asp:GridView ID="gvLocSelectionList" runat="server" AutoGenerateColumns="False" Width="1000px"
                        CssClass="gridview" DataKeyNames="RECORD_TYPE,FILTER_NAME,SYSTEM_CREATED" meta:resourcekey="gvZone" oninit="gvLocSelectionList_Init" 
                        PageSize="20" OnRowDataBound="gvLocSelectionList_RowDataBound"  onselectedindexchanging="gvLocSelectionList_SelectedIndexChanging" AllowSorting="True"   onsorting="gvLocSelectionList_Sorting">
                        <FooterStyle CssClass="GridViewFooterStyle" />
                        <RowStyle CssClass="GridViewRowStyle" />
                        <HeaderStyle CssClass="GridViewHeaderStyle" />
                        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                        <Columns>
                            <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="BoundField">
                                <ItemStyle CssClass="GridViewRowWidth_40" />
                            </asp:BoundField>
                            <asp:TemplateField meta:resourcekey="TemplateField">
                                <HeaderTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvLocSelectionList');"
                                        meta:resourcekey="CheckBox1" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chbSelect" runat="server" meta:resourceKey="chbSelect" />
                                </ItemTemplate>
                                <FooterTemplate>
                                    <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvLocSelectionList');"
                                        meta:resourceKey="CheckBox2" />
                                </FooterTemplate>
                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                            </asp:TemplateField>
                             <asp:TemplateField ShowHeader="False" Visible="False" >
                         <ItemTemplate>
                             <asp:LinkButton ID="lnkbtnLocSelect" runat="server" CausesValidation="False" 
                                 CommandName="Select" Text="&lt;img 
                                 src=&quot;../Images/select.gif&quot; class=&quot;img&quot; style=&quot;border:none 0px blue;&quot; 
                                 alt=&quot;select&quot; __designer:mapid=&quot;19a5&quot;/&gt;" 
                                 meta:resourcekey="lnkbtnLocSelect"></asp:LinkButton>
                         </ItemTemplate>
                         <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                     </asp:TemplateField>
                            <asp:TemplateField HeaderText="筛选名称" FooterText="筛选名称" SortExpression="FILTER_NAME"
                                meta:resourcekey="TemplateFieldResource2">
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("FILTER_NAME") %>' NavigateUrl='<%# FormatUrl("~/Configuration/LocSelection.aspx?from=list&RecordType={0}&FilterName={1}&Type=1",Eval("RECORD_TYPE").ToString(),Eval("FILTER_NAME").ToString()) %>'
                                        Target="_self" CssClass="hyperlink" meta:resourcekey="HyperLink1"></asp:HyperLink>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_200" />
                            </asp:TemplateField>
                                <asp:BoundField DataField="RECORD_TYPE" HeaderText="筛选类型" FooterText="筛选类型" SortExpression="RECORD_TYPE"    meta:resourcekey="RECORD_TYPE">
                                    <ItemStyle CssClass="GridViewRowWidth_200" />
                            </asp:BoundField>
                            <asp:BoundField DataField="DESCR" HeaderText="描述" FooterText="描述" SortExpression="DESCR"                        meta:resourcekey="DESCR">
                                <ItemStyle CssClass="GridViewRowWidth_200" />
                            </asp:BoundField>
                            <asp:BoundField DataField="SYSTEM_CREATED" HeaderText="系统创建" FooterText="系统创建" SortExpression="SYSTEM_CREATED"
                                meta:resourcekey="SYSTEM_CREATED">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="IS_ACTIVE" HeaderText="启用" FooterText="启用" SortExpression="IS_ACTIVE"
                                meta:resourcekey="IS_ACTIVE">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                        </Columns>
                    </asp:GridView>
                </div>
                
                <div id="div_pager">
                    <uc1:Pager ID="PagerFooter" runat="server"  OnFirst="btnFirst_Click" OnPrevious="btnPrevious_Click" OnNext="btnNext_Click" OnLast="btnLast_Click" OnGoTo="GoTo_Click"/>
                </div>
                
            </ContentTemplate>
             <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnEdit" EventName="Click" />              
                <asp:AsyncPostBackTrigger ControlID="btnAction" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="btnList" EventName="Click" />
           
            </Triggers>
        </asp:UpdatePanel>   
        
        <div id="div_List_bottom">
            <table>
                <tr>
                    <td>
                        <asp:Button ID="btnSearch" runat="server" Text="<%$Resources:ButtonResource,btnNewSearch%>" Enabled="False" 
                            CssClass="button"  OnClick="btnbtnSearch" />
                    </td>
                    <td>
                        <asp:Button ID="btnReSearch" runat="server" Text="<%$Resources:ButtonResource,btnReSearch%>" Enabled="False" CssClass="button" 
                            OnClientClick="javascript:returnSearch();return false;" 
                             />
                    </td>
                    <td>
                        <asp:Button ID="btnList" runat="server" Text="<%$Resources:ButtonResource,btnList%>" Enabled="False" CssClass="button" 
                               
                             />
                    </td>
                    <td>
                        <asp:Button ID="btnExport" runat="server" Text="<%$Resources:ButtonResource,btnExport%>" Enabled="False" CssClass="button" 
                              OnClick="btnExport_Click"  />
                    </td>
                </tr>
            </table>
        </div>      
    </div>
    <input type="hidden" id="hdnFrom" runat="server" />
    <input type="hidden" id="hdnActionID" runat="server" />
    <input type="hidden" id="hdnRtnValue" runat="server" />
        
    </div>
    </form>
</body>
</html>
